import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/index',
    component: () => import('@/views/home/index')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login')
  },
  {
    path: '/index',
    name: 'index',
    component: () => import('@/views/home/index')
  }, {
    path: '/reg',
    name: 'reg',
    component: () => import('@/views/home/reg')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('@/views/home/home'),
    children: [
      { path: '/backgroundHome', name: 'backgroundHome', component: () => import('@/views/home/rightnav/backgroundHome') },
      { path: '/healthCard', name: 'healthCard', component: () => import('@/views/home/rightnav/healthCard') },
      { path: '/aa', name: 'aa', component: () => import('@/views/home/rightnav/aa') },
      { path: '/bb', name: 'bb', component: () => import('@/views/home/rightnav/bb') },
      { path: '/cc', name: 'cc', component: () => import('@/views/home/rightnav/cc') },
      { path: '/dd', name: 'dd', component: () => import('@/views/home/rightnav/dd') },
      { path: '/ee', name: 'ee', component: () => import('@/views/home/rightnav/ee') },
      { path: '/ff', name: 'ff', component: () => import('@/views/home/rightnav/ff') },
      { path: '/gg', name: 'gg', component: () => import('@/views/home/rightnav/gg') },
      { path: '/hh', name: 'hh', component: () => import('@/views/home/rightnav/hh') },
      { path: '/ii', name: 'ii', component: () => import('@/views/home/rightnav/ii') },
      { path: '/jj', name: 'jj', component: () => import('@/views/home/rightnav/jj') },
      { path: '/kk', name: 'kk', component: () => import('@/views/home/rightnav/kk') },
      { path: '/ll', name: 'll', component: () => import('@/views/home/rightnav/ll') },
      { path: '/mm', name: 'mm', component: () => import('@/views/home/rightnav/mm') },
      { path: '/nn', name: 'nn', component: () => import('@/views/home/rightnav/nn') },
      { path: '/oo', name: 'oo', component: () => import('@/views/home/rightnav/oo') },
      { path: '/pp', name: 'pp', component: () => import('@/views/home/rightnav/pp') },
      { path: '/qq', name: 'qq', component: () => import('@/views/home/rightnav/qq') },
      { path: '/rr', name: 'rr', component: () => import('@/views/home/rightnav/rr') },
      { path: '/ss', name: 'ss', component: () => import('@/views/home/rightnav/ss') },
      { path: '/tt', name: 'tt', component: () => import('@/views/home/rightnav/tt') },
      { path: '/uu', name: 'uu', component: () => import('@/views/home/rightnav/uu') },
      { path: '/vv', name: 'vv', component: () => import('@/views/home/rightnav/vv') },
      { path: '/ww', name: 'ww', component: () => import('@/views/home/rightnav/ww') },
      { path: '/xx', name: 'xx', component: () => import('@/views/home/rightnav/xx') },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router